package org.microservice.system.dao;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.microservice.common.bean.UserVo;
import org.microservice.system.entity.SysUserDataScopeEntity;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * User: 齐丹枫
 * Date: 2018/6/20
 * Time: 15:46
 * To change this template use File | Settings | File Templates.
 * Description:
 */
@Mapper
public interface SysUserDao  extends BaseMapper<UserVo>{

    UserVo getByUserName(@Param("userName") String userName);

    List<UserVo> getUserListPage(Map<String, Object> params);

    int getUserListPageTotal(Map<String, Object> params);

    List<Map<String, String>> getDepartmentLeadersByDepartmentId(@Param("departmentId") Serializable departmentId);

    List<SysUserDataScopeEntity> getDataScopeByUserIdOrUserName(@Param("id") Integer id,@Param("username") String username);
}
